
import Home from "@/pages/Home/Home.vue";
import Login from "@/pages/Login";
import Search from "@/pages/Search/Search";
import Register from "@/pages/Register";
import Detail from "@/pages/Detail"
import ShopCart from "@/pages/ShopCart"
import AddCartSuccess from "@/pages/AddCartSuccess"
export default [
    {
        name: "home",
        path: "/home",
        component: Home,
        meta: { isHomeOrSearch: true },
    },
    {
        name: "search",
        path: "/search/:keyword?",
        component: Search,
        meta: { isHomeOrSearch: true },
        props:true
        // props({ params: { keywordP }, query: { keywordQ } }) {
        // 	return { keywordP, keywordQ };
        // },
    },
    {path:"/detail/:skuid",name:"detail",component:Detail},
    { name: "login", path: "/login", component: Login },
    { name: "register", path: "/register", component: Register },
    {name:'shopcart',path:'/shopcart',component:ShopCart},
    {name:'addcartsuccess',path:'/addcartsuccess',component:AddCartSuccess},
   
    { path: "/", redirect: "/home" },
    
]